<?php
namespace Staff\Model;
use Think\Model;
class OrderModel extends Model{
	protected $_auto 	=array(
			array('verify_code','getVerifyCode',self::MODEL_INSERT,'callback'),
			array('cdate','getCdate',self::MODEL_INSERT,'callback'),
			array('ctime','getCtime',self::MODEL_INSERT,'callback'),
			array('id','getId',self::MODEL_INSERT,'callback') , // 对id字段在新增的时候自动生成一个ID
	);
	function getId(){
		$util = A('Admin/Util');
		return  'P'.$util->getId();//生成用户ID
	}
	function getCtime(){
		return date('H:i:s');
	}
	function getCdate(){
		return date('Y-m-d');
	}
	function getVerifyCode(){
		return uniqid();
	}
}